package com.yuw.homework4;

public class SalariedEmployee extends ColaEmployee {
    // 属性
    private double salaryPerMonth;

    // 行为


    public SalariedEmployee(String empName, int empBirthMonth, int month, double salaryPerMonth) {
        super(empName, empBirthMonth, month);
        this.salaryPerMonth = salaryPerMonth;
    }

    @Override
    public double getSalary() {
        // 如果当月共生日，则工资构成为： 月工资+生日金
        return salaryPerMonth + super.getSalary();
    }
}
